/* ****************************************************************************
 *
 * Copyright (c) Microsoft Corporation. 
 *
 * This source code is subject to terms and conditions of the Microsoft Public License. A 
 * copy of the license can be found in the License.html file at the root of this distribution. If 
 * you cannot locate the  Microsoft Public License, please send an email to 
 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 *
 * You must not remove this notice, or any other, from this software.
 *
 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
 * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
 * PARTICULAR PURPOSE.
 * ***************************************************************************/


#if !defined(AFX_FILEGFXINTERFACE_H__1610038E_5F25_4B52_BD4E_6A7F372002B0__INCLUDED_)
#define AFX_FILEGFXINTERFACE_H__1610038E_5F25_4B52_BD4E_6A7F372002B0__INCLUDED_
 
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <pgl/igfx/GfxInterface.h>

namespace gfxinterface
{

/* \brief Class interface for graphic interface with file support such as EPS or SVG

  \ingroup IGfxGroup

  Intermidate class for Graphic format based on files (such as eps, or svg)
*/
class CFileGfxInterface : public CGfxInterface  
{
public:
	//! \name Constructors
	//@{
	CFileGfxInterface();
	virtual ~CFileGfxInterface();
	//@}

	virtual void BeginPaint(HDC hDC );
	virtual void EndPaint();


	//! \name Accessing the stream
	//@{
	//! Concatanate
	//! returns current string
	void GetString(std::_tstring& str) const;
	//! returns current string
	void GetString(CString& str) const;
	//! Save to file
	virtual bool Save(LPCTSTR sFileName = NULL, bool bZipped = false);
	//! clearing the string
	void ClearStream()												{	m_stream.clear();};
	//@}

	//! \name Meta tags
	//@{
	//! Sets the creator name in file header
	void SetCreator(LPCTSTR str);
	//! Sets image title
	void SetTitle(LPCTSTR str);
	//! returns creator
	LPCTSTR GetCreator() const;
	//! returns title
	LPCTSTR GetTitle() const;
	//! return file extension
	virtual LPCTSTR GetFileExt() const = 0;
	//@}

	std::_tostringstream m_stream;

private:
	std::_tstring m_sCreator;
	std::_tstring m_sTitle;
};

}
#endif // !defined(AFX_FILEGFXINTERFACE_H__1610038E_5F25_4B52_BD4E_6A7F372002B0__INCLUDED_)
